package com.ipet.app.util;

import android.content.Context;
import android.util.TypedValue;
import android.view.View;

import com.ipet.app.R;

/**
 * Created by jindongping on 16/4/14.
 */
public class RippleHelper {

    /**
     * 给view添加水波纹
     */
    public static void addRipple(Context context, View view) {
        TypedValue typedValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.selectableItemBackground, typedValue, true);
        view.setBackgroundResource(typedValue.resourceId);
    }

}
